#!/bin/bash

/usr/bin/aspell dump master -l fr | /usr/bin/aspell expand | grep -v "'" | grep -v "-" > dico_complet.txt

grep '\<[a-z]\{2\}\>' dico_complet.txt > full_2.txt
grep '\<[a-z]\{3\}\>' dico_complet.txt > full_3.txt
grep '\<[a-z]\{4\}\>' dico_complet.txt > full_4.txt
grep '\<[a-z]\{5\}\>' dico_complet.txt > full_5.txt
grep '\<[a-z]\{6\}\>' dico_complet.txt > full_6.txt
grep '\<[a-z]\{7\}\>' dico_complet.txt > full_7.txt
grep '\<[a-z]\{8\}\>' dico_complet.txt > full_8.txt
grep '\<[a-z]\{9\}\>' dico_complet.txt > full_9.txt

java -jar ../bin/gougeon/java/solveurdictionnaire/SolveurDictionnaire.jar full_2.txt > 2.csv
java -jar ../bin/gougeon/java/solveurdictionnaire/SolveurDictionnaire.jar full_3.txt > 3.csv
java -jar ../bin/gougeon/java/solveurdictionnaire/SolveurDictionnaire.jar full_4.txt > 4.csv
java -jar ../bin/gougeon/java/solveurdictionnaire/SolveurDictionnaire.jar full_5.txt > 5.csv
java -jar ../bin/gougeon/java/solveurdictionnaire/SolveurDictionnaire.jar full_6.txt > 6.csv
java -jar ../bin/gougeon/java/solveurdictionnaire/SolveurDictionnaire.jar full_7.txt > 7.csv
java -jar ../bin/gougeon/java/solveurdictionnaire/SolveurDictionnaire.jar full_8.txt > 8.csv
